package com.test.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.myapplication.mgreendao.pojo.StudentGreen;
import com.example.myapplication.mgreendao.pojo.UserGreen;

import com.test.greendao.StudentGreenDao;
import com.test.greendao.UserGreenDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig studentGreenDaoConfig;
    private final DaoConfig userGreenDaoConfig;

    private final StudentGreenDao studentGreenDao;
    private final UserGreenDao userGreenDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        studentGreenDaoConfig = daoConfigMap.get(StudentGreenDao.class).clone();
        studentGreenDaoConfig.initIdentityScope(type);

        userGreenDaoConfig = daoConfigMap.get(UserGreenDao.class).clone();
        userGreenDaoConfig.initIdentityScope(type);

        studentGreenDao = new StudentGreenDao(studentGreenDaoConfig, this);
        userGreenDao = new UserGreenDao(userGreenDaoConfig, this);

        registerDao(StudentGreen.class, studentGreenDao);
        registerDao(UserGreen.class, userGreenDao);
    }
    
    public void clear() {
        studentGreenDaoConfig.clearIdentityScope();
        userGreenDaoConfig.clearIdentityScope();
    }

    public StudentGreenDao getStudentGreenDao() {
        return studentGreenDao;
    }

    public UserGreenDao getUserGreenDao() {
        return userGreenDao;
    }

}
